# -*- coding: utf-8 -*-

from main2 import ParallelTickDriver, PollingPolicyInitialization

# # # 双均线回测测试
# # celueduixiang = PollingPolicyInitialization(1)
# # df = celueduixiang.celuebianyi('shuangtongdao_jc', "SHFE.sp2110", 1800, 1000, [1, 26, 0.6, 30, 5, 2, 2], 0)
# # print(df)
#
# # 跨周期回测
# # 日线
# celueduixiang = PollingPolicyInitialization(1)
# # df = celueduixiang.celuebianyi('rxzb_vv1', "KQ.m@CFFEX.IF", 24*60*60, 200, [1, 26, 98], 0)
# df = celueduixiang.celuebianyi('gzrxzb_vv1', "CFFEX.IH2110", 24*60*60, 100, [1, 26, 98], 0)
#
# # 5min回归线
# celueduixiang = PollingPolicyInitialization(2)
# # df = celueduixiang.celuebianyi('rxzb_vv1', "KQ.m@CFFEX.IF", 24*60*60, 200, [1, 26, 98], 0)
# df2 = celueduixiang.celuebianyi('zs5minhgx_vv1', "SSE.000300", 5*60, 1501, [1, 26, 98], 0)
#
# # 1分钟本周期
# celueduixiang = PollingPolicyInitialization(3)
# df3 = celueduixiang.celuebianyi('hgxjrxzb_d1', "CFFEX.IH2110", 60, 3001, [1, 15, 98], 0)
# print(df3)

# # 跨周期回测
# # 日线
# celueduixiang = PollingPolicyInitialization(1)
# # df = celueduixiang.celuebianyi('rxzb_vv1', "KQ.m@CFFEX.IF", 24*60*60, 200, [1, 26, 98], 0)
# df = celueduixiang.celuebianyi('rixianjunxian_vv1', "CFFEX.IC2110", 24*60*60, 100, [1, 5, 98], 0)
#
# # 1分钟本周期
# celueduixiang = PollingPolicyInitialization(3)
# df3 = celueduixiang.celuebianyi('junxiancelue_v3k', "CFFEX.IC2110", 300, 1100, [1, 20, 145500], 0)
# print(df3)

# 跨周期回测
# 日线
celueduixiang = PollingPolicyInitialization(1)
# df = celueduixiang.celuebianyi('rxzb_vv1', "KQ.m@CFFEX.IF", 24*60*60, 200, [1, 26, 98], 0)
df = celueduixiang.celuebianyi('cizhulikxian_vv1', "CFFEX.IC2110", 300, 100, [1, 5, 98], 0)
